<%@page pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> 
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link type="text/css" rel="stylesheet" href="/easybuy/css/style.css" />
    <!--[if IE 6]>
    <script src="/easybuy/js/iepng.js" type="text/javascript"></script>
        <script type="text/javascript">
           EvPNG.fix('div, ul, img, li, input, a'); 
        </script>
    <![endif]-->
	<style type="text/css">
		#myDiv{width:800px;padding:10px 20px;
		position: absolute;left: 350px;top: 240px;font-size: 15px;}
        #tb {
            margin: 0 auto;
            width: 700px;
            border:1px solid #eaeaea;
            border-collapse: collapse;/*关键代码*/
        }
        #tb th,#tb td {
            text-align: center;
            border: 1px solid #eaeaea;
        }
        #tj{
        	margin:10px 0 10px 60px;
        }
	</style>
<title>尤洪</title>

</head>
<body>  
<%@include file="topBar.jsp" %>
<%@include file="leftBar.jsp" %>
<div id="myDiv" class="left_m">
	<h3>用户信息</h3>
	<a style="position: absolute;left: 700px; top:10px;" href="addUser.jsp">新增用户</a>
	<form action="UserServlet?opr=mohu" method="post" id="tj">
		真实姓名<input type="text" name="userName" id="userName"/><input type="submit" value="查询"/>
	</form>
	<table id="tb">
		<tr>
			<td>用户名称</td>
			<td>真实姓名</td>
			<td>性别</td>
			<td>类型</td>
			<td colspan="2">操作</td>
		</tr>
		<c:forEach items="${requestScope.userList }" var="user">
			<tr>
				<td>${user.loginName }</td>
				<td>${user.userName }</td>
				<td>
					<c:if test="${user.sex==1 }">男</c:if>
					<c:if test="${user.sex==0 }">女</c:if>
				</td>
				<td>
					<c:if test="${user.type==1 }">管理员</c:if>
					<c:if test="${user.type==0 }">普通会员</c:if>
				</td>
				<td>
					<c:if test="${user.type==1 }"><a href="UserServlet?opr=selectId&id=${user.id }">修改</a></c:if>
					<c:if test="${user.type==0 }"><a href="UserServlet?opr=selectId&id=${user.id }">修改</a></c:if>
				</td>
				<td>
					<c:if test="${user.type==0 }"><a href="UserServlet?opr=delUser&id=${user.id }">删除</a></c:if>
				</td>
			</tr>
		</c:forEach>
	</table>
</div>
<%@include file="bottomBar.jsp" %>
</body>


<!--[if IE 6]>
<script src="//letskillie6.googlecode.com/svn/trunk/2/zh_CN.js"></script>
<![endif]-->
</html>
